package com.hntest.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class BaseAuditDomain extends BaseDomain{

	/**
	 * 
	 */
	private static final long serialVersionUID = -425149300853734063L;
	public static final int STATE_APPLY= 0;//申请状态
	public static final int STATE_PASS= 1;//审核通过
	public static final int STATE_REJECT= 2;//审核拒绝
	
	private String remark;//审核时的备注信息
	private LoginInfo applier;//申请人
	private LoginInfo auditor;//审核操作员
    @DateTimeFormat(pattern="yyyy-MM-dd")//页面输入日期时，可以根据该格式自动进行类型转换
	private Date auditTime;//审核操作时间
    @DateTimeFormat(pattern="yyyy-MM-dd")//页面输入日期时，可以根据该格式自动进行类型转换
	private Date applyTime=new Date();//申请时间
	private int state=STATE_APPLY;//状态
	
	public String getStateDisplay() {
		switch (state) {
		case STATE_APPLY:
			return "申请状态";
		case STATE_PASS:
			return "审核通过";
		case STATE_REJECT:
			return "审核拒绝";
		default:
			return "错误状态";
		}
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public LoginInfo getApplier() {
		return applier;
	}

	public void setApplier(LoginInfo applier) {
		this.applier = applier;
	}

	public LoginInfo getAuditor() {
		return auditor;
	}

	public void setAuditor(LoginInfo auditor) {
		this.auditor = auditor;
	}

	public Date getAuditTime() {
		return auditTime;
	}

	public void setAuditTime(Date auditTime) {
		this.auditTime = auditTime;
	}

	public Date getApplyTime() {
		return applyTime;
	}

	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	
}
